package com.weather.modules.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 
 * </p>
 *
 * @author yf.zhu
 * @since 2020-01-21
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("_w_forecast")
public class Forecast extends Model<Forecast> {

    private static final long serialVersionUID = 1L;

//    @TableId(value = "id", type = IdType.AUTO)
//    private Long id;

    /**
     * 城市id
     */
    @TableId("city_id")
    private String cityId;

    /**
     * 时间
     */
    @TableField("date")
    private String date;

    /**
     * 最高气温
     */
    @TableField("high")
    private String high;

    /**
     * 风力
     */
    @TableField("fengli")
    private String fengli;

    /**
     * 最低气温
     */
    @TableField("low")
    private String low;

    /**
     * 风向
     */
    @TableField("fengxiang")
    private String fengxiang;

    /**
     * 天气类型
     */
    @TableField("type")
    private String type;

    /**
     * 创建时间
     */
    @TableField("create_data")
    private LocalDateTime createData;

    /**
     * 更新时间
     */
    @TableField("update_data")
    private LocalDateTime updateData;



    @Override
    protected Serializable pkVal() {
        return this.cityId;
    }

}
